<?php 
namespace Home\Model;
use Think\Model;
Class UserinfoModel extends Model{     

       //验证登录信息
    public function checkName($name,$pwd){
        $admin = M("Userinfo");
       return $info = $admin->where("tel=".$name)->find();
        if($info != null){
            //验证密码
            if($info['password'] == $pwd){
                return $info;
            }else{
                return false;
            }
        }else{
            return false;
        }
    }

  
}
?>

